<?php
namespace app\common\validate;

use think\Validate;

class CustomerCaseValidate extends Validate{

    protected $rule = [
        'catid'=>'number',    //名称可以相同
        'title'=>'require',
        'cover'=>'require',
        'desc'=>'require',
        'content'=>'require'
    ];

    protected $message = [
        'catid.number'=>'请正确选择分类',
        'title.require'=>'标题必填',
        'cover.require'=>'封面必填',
        'desc.require'=>'描述必填',
        'content.require'=>'内容必填',
    ];

    protected $scene = [
        'add' => ['catid','title','cover','desc','content'],
        'edit' => ['catid','title','cover','desc','content'],
    ];
}